/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.cash.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.cash.entity.StoreConsumeRechargeCard;

/**
 * 会员卡充值业务消费DAO接口
 * @author liujiang
 * @version 2013-11-24
 */
public interface StoreConsumeRechargeCardDao extends StoreConsumeRechargeCardDaoCustom, CrudRepository<StoreConsumeRechargeCard, Long> {
	@Modifying
	@Query("from StoreConsumeRechargeCard where CONSUME_ID=?1")
	public List<StoreConsumeRechargeCard> findListByConsume(Long consumeID);
	
	@Query("from StoreConsumeRechargeCard where CARD_TYPE=?1")
	public List<StoreConsumeRechargeCard> findListByCardType(int cardType);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface StoreConsumeRechargeCardDaoCustom extends BaseDao<StoreConsumeRechargeCard> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class StoreConsumeRechargeCardDaoImpl extends BaseDaoImpl<StoreConsumeRechargeCard> implements StoreConsumeRechargeCardDaoCustom {

}
